<!--
 * @Description: 
 * @Author: xuechengwu
 * @Email: 516385822@qq.com
 * @Date: 2021-11-20 14:59:29
 * @LastEditTime: 2022-02-07 10:26:50
 * @LastEditors: xuechengwu
-->
<template>
  <el-menu :default-active="active" collapse>
      <el-menu-item index="scene" @click="switchMenu('scene')">
          <i class="el-icon-document-copy"></i>
          <span slot="title">场景</span>
      </el-menu-item>
      <el-menu-item index="layout" @click="switchMenu('layout')">
          <i class="el-icon-s-grid"></i>
          <span slot="title">布局</span>
      </el-menu-item>
      <el-menu-item index="component" @click="switchMenu('component')">
          <i class="el-icon-menu"></i>
          <span slot="title">组件</span>
      </el-menu-item>
  </el-menu>
</template>

<script>
export default {
    data() {
        return {
            active: 'scene',
        };
    },
    methods: {
        switchMenu(val) {
            this.active = val;
            this.$emit('change', val);
        },
    },
}
</script>

<style lang="less" scoped>

</style>
